/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pfc.core.db;

/**
 *
 * @author xandru
 */
public class SinglePrimaryKey implements PrimaryKey{
    private String field;
    private final String value;

    public SinglePrimaryKey(String value)
    {
       this.value = value;
    }

    public SinglePrimaryKey(String field, Integer value)
    {
        this.field = field;
        this.value = value.toString();
    }

    public SinglePrimaryKey(String field, Short value)
    {
        this.field = field;
        this.value = value.toString();
    }

    public SinglePrimaryKey(String field, String value)
    {
        this.field = field;
        this.value = value;
    }

    public String getField() {
        return field;
    }

    public String getStringValue() {
        return value;
    }

    public Integer getIntegerValue() {
       return new Integer(value);
    }

}
